package com.eastfair.pay.dto;

import com.eastfair.pay.enumeration.ChinaumsLogRequestTypeEnum;
import com.eastfair.pay.enumeration.TransactionOrderOrderTypeEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import lombok.Data;
import lombok.Builder;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;
import org.springframework.expression.spel.ast.Assign;

import java.io.Serializable;

/**
 * <p>
 * 实体类
 * 调用银联日志
 * </p>
 *
 * @author linan
 * @since 2023-05-05
 */
@Data
@ApiModel(value = "ChinaumsLogUpdateDTO", description = "调用银联日志")
public class ChinaumsLogDTO implements Serializable {

    private static final long serialVersionUID = 1L;

    public interface MiniPay {
    }

    @ApiModelProperty(value = "主键")
    private Long id;

    /**
     * 是否启用：1是；0否
     */
    @ApiModelProperty(value = "是否启用：1是；0否")
    private Integer isEnabled;
    /**
     * 是否删除：1是；0否
     */
    @ApiModelProperty(value = "是否删除：1是；0否")
    private Integer isDeleted;
    /**
     * 项目id
     */
    @ApiModelProperty(value = "项目id")
    private Long projectId;
    /**
     * 子系统id
     */
    @ApiModelProperty(value = "子系统id")
    private Long subsystemId;
    /**
     * 租户id
     */
    @ApiModelProperty(value = "租户id")
    private Long tenantId;
    /**
     * 业务单号
     */
    @ApiModelProperty(value = "业务单号")
    @Size(max = 255, message = "业务单号长度不能超过255")
    @NotEmpty(message = "业务单号不可为空", groups = {MiniPay.class})
    private String orderNum;
    /**
     * 是否调用成功：1是；0否
     */
    @ApiModelProperty(value = "是否调用成功：1是；0否")
    private Integer isSuccess;
    /**
     * 请求url
     */
    @ApiModelProperty(value = "请求url")
    @Size(max = 1000, message = "请求url长度不能超过1000")
    private String requestUrl;
    /**
     * 回调url
     */
    @ApiModelProperty(value = "回调url")
    @Size(max = 1000, message = "回调url长度不能超过1000")
    private String returnUrl;
    /**
     * 通知url
     */
    @ApiModelProperty(value = "通知url")
    @Size(max = 1000, message = "通知url长度不能超过1000")
    private String notifyUrl;
    /**
     * 授权
     */
    @ApiModelProperty(value = "授权")
    @Size(max = 255, message = "授权长度不能超过255")
    private String auth;
    /**
     * 认证报文
     */
    @ApiModelProperty(value = "认证报文")
    @Size(max = 255, message = "认证报文长度不能超过255")
    private String signature;
    /**
     * 请求参数
     */
    @ApiModelProperty(value = "请求参数")
    @Size(max = 65535, message = "请求参数长度不能超过65,535")
    private String requestParameter;
    /**
     * 响应结果
     */
    @ApiModelProperty(value = "响应结果")
    @Size(max = 65535, message = "响应结果长度不能超过65,535")
    private String responseResults;
    /**
     * 银联下单单号
     */
    @ApiModelProperty(value = "银联下单单号")
    @Size(max = 255, message = "银联下单单号长度不能超过255")
    private String merOrderId;
    /**
     * 银联退款单号
     */
    @ApiModelProperty(value = "银联退款单号")
    @Size(max = 255, message = "银联退款单号长度不能超过255")
    private String refundOrderId;
    /**
     * 付款金额
     */
    @ApiModelProperty(value = "付款金额")
    @NotNull(message = "付款金额不可为空", groups = {MiniPay.class})
    private Long totalAmount;
    /**
     * 退款金额
     */
    @ApiModelProperty(value = "退款金额")
    private Long refundAmount;
    /**
     * 请求类型 #{PAY:下单支付;QUERY:查询;REFUND:退款}
     */
    @ApiModelProperty(value = "请求类型 #{PAY:下单支付;QUERY:查询;REFUND:退款}")
    private ChinaumsLogRequestTypeEnum requestType;
    /**
     * 业务类型:#{CONTRACT:合同;SERVICE:服务;CERTIFICATE:证件;WORKEXTRA:加班;FINE:罚款;BOND:保证金;EXHIBITION:展览;MEETING:会议;FOOD:餐饮}
     */
    @ApiModelProperty(value = "业务类型:#{CONTRACT:合同;SERVICE:服务;CERTIFICATE:证件;WORKEXTRA:加班;FINE:罚款;BOND:保证金;EXHIBITION:展览;MEETING:会议;FOOD:餐饮}")
    @NotNull(message = "业务类型不可为空", groups = {MiniPay.class})
    private TransactionOrderOrderTypeEnum orderType;
    /**
     * 银联支付方式
     */
    @ApiModelProperty(value = "银联支付方式")
    @Size(max = 255, message = "银联支付方式长度不能超过255")
    private String instMid;
    /**
     * 微信用户子标识
     */
    @ApiModelProperty(value = "微信用户子标识")
    @Size(max = 255, message = "微信用户子标识255")
    @NotEmpty(message = "微信用户子标识不可为空", groups = {MiniPay.class})
    private String subOpenId;
    /**
     * 微信子商户 appId
     */
    @ApiModelProperty(value = "微信子商户 appId")
    @Size(max = 255, message = "微信子商户 appId255")
    private String subAppId;

}
